package java3_23.Zoo;
//鹦鹉类 子类
public class Parrot extends Bird implements Flight{
    public Parrot(){
        super();
    }
    public Parrot(String name, String sex, String type) {
        super(name, sex, type);
    }

    @Override
    public void eat() {
        System.out.println(getType()+getName()+"正在吃虫子");
    }

    @Override
    public void play() {

        System.out.println(getType()+getName()+"正在玩耍");
        Parrot.this.fly();
    }


    @Override
    public void fly() {
        System.out.println(getType()+getName()+"正在悠闲的飞行");
    }
}
